home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / C / LIB / UNIXLIB37B / !UnixLib37 / src / c / assert < prev    next >
Text File  |  1996-11-09  |  770b  |  36 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /unixb/home/unixlib/source/unixlib37/src/c/RCS/assert,v $
  4.  * $Date: 1996/04/19 21:26:42 $
  5.  * $Revision: 1.1 $
  6.  * $State: Rel $
  7.  * $Author: simon $
  8.  *
  9.  * $Log: assert,v $
  10.  * Revision 1.1  1996/04/19 21:26:42  simon
  11.  * Initial revision
  12.  *
  13.  ***************************************************************************/
  14.  
  15. static const char rcs_id[] = "$Id: assert,v 1.1 1996/04/19 21:26:42 simon Rel $";
  16.  
  17. #include <stdio.h>
  18. #include <signal.h>
  19. #include <assert.h>
  20.  
  21. int
  22. __fail (char *exp, char *file, int line)
  23.  
  24. {
  25.   fprintf (stderr, "\n\"%s\", line %d: Assertion failed: %s\n", file, line, exp);
  26.   raise (SIGABRT);
  27.   return (0);
  28. }
  29.  
  30. void
  31.   (assert) (register int x)
  32.  
  33. {
  34.   assert (x);
  35. }
  36.